package com.leejxx.health.dao;

import com.leejxx.health.pojo.Order;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @Author LeeJx
 * @ClassName OrderDao
 * @Description TODO
 * @date 2021/1/6 15:27
 * @Version 1.0
 */
public interface OrderDao {

    Long countByMemberAndDateAndSetMeal(@Param("memberId") Integer memberId, @Param("orderDate") Date orderDate, @Param("setMealId") Integer setMealId);

    void insert(Order order);

    Order findById(@Param("id") Integer id);

    Long countByOrderDateRange(@Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("status") String status);

    List<Map<String,Object>> countByHotSetMeal(@Param("topN") int topN);
}
